<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/seajs/sea-debug.js" data-main='./js/init/update-email'></script>
<div class='center span-4'>
    <h1>更新邮件地址</h1>

    <?php
    $this->widget('bootstrap.widgets.TbAlert', array(
        'block' => true, // display a larger alert block?
        'fade' => true, // use transitions?
        'closeText' => '&times;', // close link text - if set to false, no close link is displayed
        'alerts' => array( // configurations per alert type
            'success' => array('block' => true, 'fade' => true, 'closeText' => '&times;'), // success, info, warning, error or danger
            'error' => array('block'=>true,'fade'=>true,'closeText'=>'&times;'),
            'warning' => array('block'=>true,'fade'=>true,'closeText'=>'&times;'),
            'info' => array('block'=>true,'fade'=>true,'closeText'=>'&times;'),
        ),
    ));
    ?>

    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'email-update-form',
        'enableAjaxValidation' => false,
    ));
    ?>

    <div>
        <label for="email">你现在使用的邮箱:</label>
        <input type="text" name="email" id="email" class="{required:true,email:true}" value="29283212@qq.com">
    </div>

    <div >
        <label for="password">你当前的登录密码:</label>
        <input type="password" name="password" id="password" class="{required:true}">
    </div>

    <div >
        <label for="new_email">你想设置的新登录邮箱:</label>
        <input type="text" name="new_email" id="new_email" class="{required:true,email:true,notEqualTo:'#email'}" value="29283212@qq.com">
    </div>

    <div class="buttons">
        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType' => 'submit',
            'type' => 'primary',
            'label' => '更新我的邮箱',
            'loadingText' => '正在更新...',
            'htmlOptions' => array('id' => 'btnSubmit'),
        ));
        ?>

        <?php
        $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType' => 'button',
            'label' => '撤销',
            'htmlOptions' => array('id' => 'btnCancel'),
        ));
        ?>
    </div>

    <?php $this->endWidget(); ?>
</div>